﻿<UserControl x:Class="VmroleAuthor.Views.ViewDefView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignWidth="900">
    <UserControl.Resources>
        <Style x:Key="MyButtonStyle" TargetType="Button">
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="Margin" Value="4" />
            <Setter Property="Height" Value="28" />
            <Setter Property="BorderThickness" Value="0"></Setter>
        </Style>
    </UserControl.Resources>
    <Grid VerticalAlignment="Top" ShowGridLines="False">
        <Grid.RowDefinitions>
            <RowDefinition Height="6" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition MinHeight="30" />
            <RowDefinition Height="Auto" />
            <RowDefinition MinHeight="30" />
            <RowDefinition Height="Auto" />
            <RowDefinition MinHeight="30" />
            <RowDefinition Height="Auto" />
            <RowDefinition MinHeight="30" />
            <RowDefinition Height="Auto" />
            <RowDefinition MinHeight="30" />
            <RowDefinition Height="Auto" />
            <RowDefinition MinHeight="30" />
            <RowDefinition Height="Auto" />
            <RowDefinition MinHeight="30" />
            <RowDefinition Height="Auto" />
            <RowDefinition MinHeight="30" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="6"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="6"/>
        </Grid.ColumnDefinitions>

        <!-- Label -->
        <Label Grid.Row="1" Grid.Column ="0" >Label</Label>
        <ContentControl Grid.Row="1" Grid.Column="2" Content="{Binding Path=Label}" />

        <!-- PublisherLabel -->
        <Label Grid.Row="2" Grid.Column ="0" >PublisherLabel</Label>
        <ContentControl Grid.Row="2" Grid.Column="2" Content="{Binding Path=PublisherLabel}" />

        <!-- Description -->
        <Label Grid.Row="3" Grid.Column ="0" >Description</Label>
        <ContentControl Grid.Row="3" Grid.Column="2" Content="{Binding Path=Description}" />

        <!--DefaultLanguageCode -->
        <Label Grid.Row="4" Grid.Column ="0" >DefaultLanguageCode</Label>
        <ComboBox x:Name="DefaultLanguageCode"  Grid.Row="4" Grid.Column="2" IsEditable="True" ItemsSource="{Binding AvailableDefaultLanguageCodes}" SelectedItem="{Binding SelectedDefaultLanguageCode}"  Text="{Binding DefaultLanguageCode, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{x:Null}">
            <ComboBox.ToolTip>
                Drop down for options
            </ComboBox.ToolTip>
        </ComboBox>       
        <ContentPresenter Grid.Row="5" Grid.Column="2" Content="{Binding ElementName=DefaultLanguageCode , Path=(Validation.Errors).CurrentItem}" />

        <!-- Version -->
        <Label Grid.Row="6" Grid.Column ="0" >Version</Label>
        <TextBox x:Name="Version" Grid.Row="6" Grid.Column="2" Text="{Binding Version , ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{x:Null}" />
        <ContentPresenter Grid.Row="7" Grid.Column="2" Content="{Binding ElementName=Version , Path=(Validation.Errors).CurrentItem}" />

        <!-- small icon.png -->
        <Label Grid.Row="8" Grid.Column ="0" >Small Icon (30x30)</Label>
        <Grid  Grid.Row="8" Grid.Column ="2">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="6"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="6"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <TextBox Grid.Column="0" x:Name="SmallIconPath" Text="{Binding SelectedSmallIconPath, Mode = TwoWay, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{x:Null}" ></TextBox>
            <!-- Browse Button-->
            <Button Grid.Column="2" Margin="0" Padding="0" DockPanel.Dock="Right" MinWidth="50" Command="{Binding SelectSmallIconCommand}">...</Button>
            <!-- Update Button-->
            <Button Grid.Column="4" Margin="0" Padding="0" DockPanel.Dock="Right" MinWidth="50" Command="{Binding UpdateSmallIconCommand}">Update</Button>
        </Grid>
        <ContentPresenter Grid.Row="9" Grid.Column="2"  Content="{Binding ElementName=SmallIconPath, Path=(Validation.Errors).CurrentItem}" />
        
        <!-- small image -->
        <Image  Grid.Row="10" Grid.Column ="2"  VerticalAlignment="Center" Height="30" Width="30" HorizontalAlignment="Left" Source="{Binding SelectedSmallIconPath, Mode = OneWay}">                        
        </Image>


        <!-- medium icon.png -->
        <Label Grid.Row="12" Grid.Column ="0" >Medium Icon (60x60)</Label>
        <Grid  Grid.Row="12" Grid.Column ="2">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="6"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="6"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <TextBox Grid.Column="0" x:Name="MediumIconPath" Text="{Binding SelectedMediumIconPath, Mode = TwoWay, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{x:Null}" ></TextBox>
            <!-- Browse Button-->
            <Button Grid.Column="2" Margin="0" Padding="0" DockPanel.Dock="Right" MinWidth="50" Command="{Binding SelectMediumIconCommand}">...</Button>
            <!-- Update Button-->
            <Button Grid.Column="4" Margin="0" Padding="0" DockPanel.Dock="Right" MinWidth="50" Command="{Binding UpdateMediumIconCommand}">Update</Button>
        </Grid>
        <ContentPresenter Grid.Row="13" Grid.Column="2"  Content="{Binding ElementName=MediumIconPath, Path=(Validation.Errors).CurrentItem}" />

        <!-- med image -->
        <Image  Grid.Row="14" Grid.Column ="2"  VerticalAlignment="Center" Height="60" Width="60" HorizontalAlignment="Left" Source="{Binding SelectedMediumIconPath, Mode = OneWay}">                           
        </Image>


        <!-- medium icon.png -->
        <Label Grid.Row="16" Grid.Column ="0" >Large Icon (120x120)</Label>
        <Grid  Grid.Row="16" Grid.Column ="2">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="6"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="6"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <TextBox Grid.Column="0" x:Name="LargeIconPath" Text="{Binding SelectedLargeIconPath, Mode = TwoWay, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{x:Null}" ></TextBox>
            <!-- Browse Button-->
            <Button Grid.Column="2" Margin="0" Padding="0" DockPanel.Dock="Right" MinWidth="50" Command="{Binding SelectLargeIconCommand}">...</Button>
            <!-- Update Button-->
            <Button Grid.Column="4" Margin="0" Padding="0" DockPanel.Dock="Right" MinWidth="50" Command="{Binding UpdateLargeIconCommand}">Update</Button>
        </Grid>
        <ContentPresenter Grid.Row="17" Grid.Column="2"  Content="{Binding ElementName=LargeIconPath, Path=(Validation.Errors).CurrentItem}" />

        <!-- med image -->
        <Image  Grid.Row="18" Grid.Column ="2"  VerticalAlignment="Center" Height="120" Width="120" HorizontalAlignment="Left" Source="{Binding SelectedLargeIconPath, Mode = OneWay}">                          
        </Image>


    </Grid>      
</UserControl>
